home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ccdl150l.zip / SORT / TEST / SORTTST.C next >
C/C++ Source or Header  |  1996-07-03  |  231b  |  13 lines

  1. char *list[6] = { "Z","U","B","W","F","A" };
  2.  
  3. int compare(char **a,char **b)
  4. {
  5.     return(strcmp(*a,*b));
  6. }
  7. void main(void)
  8. {
  9.     int i;
  10.     qsort(list,6,sizeof(char *),compare);
  11.     for (i=0; i <6; i++)
  12.         printf("%s\n",list[i]);
  13. }